cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(recipe-07 LANGUAGES CXX C)

if (NOT CMAKE_BUILD_TYPE)                           # 一共四种: Debug Release RelWithDebInfo MinSizeRel
    set(CMAKE_BUILD_TYPE Release )
endif ()
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

# c编译的标志位
message(STATUS "C flags, Debug configuration: ${CMAKE_C_FLAGS_DEBUG}")                              # Debug
message(STATUS "C flags, Release configuration: ${CMAKE_C_FLAGS_RELEASE}")                          # Release
message(STATUS "C flags, Release configuration with debug info: ${CMAKE_C_FLAGS_RELWITHDEBINFO}")   # Release with debug info
message(STATUS "C flags, mini Release configuration: ${CMAKE_C_FLAGS_MINSIZEREL}")                  # mini size Release

# c++编译的标志位
message(STATUS "C++ flags, Debug configuration: ${CMAKE_CXX_FLAGS_DEBUG}")                              # Debug
message(STATUS "C++ flags, Release configuration: ${CMAKE_CXX_FLAGS_RELEASE}")                          # Release
message(STATUS "C++ flags, Release configuration with debug info: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")   # Release with debug info
message(STATUS "C++ flags, mini Release configuration: ${CMAKE_CXX_FLAGS_MINSIZEREL}")                  # mini size Release



